#include "axisrangesetting.h"
#include "ui_axisrangesetting.h"

AxisRangeSetting::AxisRangeSetting(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AxisRangeSetting)
{
    ui->setupUi(this);
}

AxisRangeSetting::~AxisRangeSetting()
{
    delete ui;
}

void AxisRangeSetting::setOption(QString &text, double lower, double upper) {
    ui->labelUpper->setText("上限值  " + text);
    ui->labelLower->setText("下限值  " + text);
    ui->spinUpper->setValue(upper);
    ui->spinLower->setValue(lower);
}

QPair<double, double> AxisRangeSetting::getOption() {
    return {ui->spinLower->value(), ui->spinUpper->value()};
}
